<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改通道</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="x-body">
    <form class="layui-form" id="add_cedew" onsubmit="return false;">
        <input type="hidden" name="id" value="${model.id!}">
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>通道名称:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="username" name="epayName" value="${model.epayName!}" required=""
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                <span class="x-red">*</span>商户ID:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="phone" name="pid" required="" value="${model.pid!}"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                <span class="x-red">*</span>应用ID:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="age" name="appId" required="" value="${model.appId!}"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                <span class="x-red">*</span>支付宝公钥:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="publicKey" name="publicKey" required=""
                       autocomplete="off" value="${model.publicKey!}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                <span class="x-red">*</span>应用秘钥:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="privateKey" name="privateKey" required=""
                       autocomplete="off" value="${model.privateKey!}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>
        <div class="layui-form-item" style="width: 300px;">
            <label class="layui-form-label">状态:</label>
            <div class="layui-input-block">
                <select name="status">
                    <option value="0" <%if(model.status! ==0){%>selected<%}%> >禁用</option>
                    <option value="1" <%if(model.status! ==1){%>selected<%}%>>启用</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item" style="width: 300px;">
            <label class="layui-form-label">方式:</label>
            <div class="layui-input-block">
                <select name="payType">
                    <option value="0" <%if(model.payType! ==0){%>selected<%}%>>电脑/手机网站支付</option>
                    <option value="1" <%if(model.payType! ==1){%>selected<%}%> >当面付</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_email" class="layui-form-label">
                <span class="x-red">*</span>排序号:
            </label>
            <div class="layui-input-inline">
                <input type="number" id="L_email" name="orderBy" required="" value="${model.orderBy!}"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_email" class="layui-form-label">
                <span class="x-red">*</span>最小支持:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="balnes" name="minPayMoney" required="" aria-valuemax=""
                       autocomplete="off" class="layui-input" value="${model.minPayMoney!0.01}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">注意:此处填写该通道最小支持支付的金额</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_email" class="layui-form-label">
                <span class="x-red">*</span>最大支持:
            </label>
            <div class="layui-input-inline">
                <input type="text" id="url" name="maxPayMoney" required=""
                       autocomplete="off" value="${model.maxPayMoney!1000.00}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">注意:此处填写该通道最大支持支付的金额</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
            </label>
            <button class="layui-btn" onclick="add_dwdwd()">
                修改
            </button>
        </div>
    </form>
</div>
<script>
    layui.use(['form', 'layer'], function () {
        $ = layui.jquery;
    });

    function add_dwdwd() {
        var data = $("#add_cedew").serialize();
        layer.load(0);
        $.post("/admin/payconfig/alipay_update",
            data,
            function (data) {
            layer.closeAll();
                layer.alert(data.msg, {icon: 6}, function () {
                    window.parent.location.reload();
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                });
            }, "json");
    }

</script>
</body>
</html>